package com.example.springbootzuoye.controller;

import com.example.springbootzuoye.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

@Controller
public class IndexController {
    @RequestMapping("index")
    public String indexTest(){
        System.out.println("跳转到jsp页面");
        return "index";
    }

    @RequestMapping("usertest")
    @ResponseBody
    public User userTest(){
        return new User("ccc",24,new Date());
    }
}
